/**
 * 
 */
package com.starview.star.compiler.cafe.compile.cont;


import com.starview.platform.data.type.Location;
import com.starview.star.compiler.ErrorReport;
import com.starview.star.compiler.cafe.compile.CafeDictionary;
import com.starview.star.compiler.cafe.compile.CodeContext;
import com.starview.star.compiler.cafe.compile.ISpec;



public class ComboCont implements IContinuation
{
  private final IContinuation cont1, cont2;

  public ComboCont(IContinuation cont1, IContinuation cont2)
  {
    this.cont1 = cont1;
    this.cont2 = cont2;
  }

  @Override
  public ISpec cont(ISpec src, CafeDictionary cxt, Location loc, ErrorReport errors, CodeContext ccxt)
  {
    ISpec left = cont1.cont(src, cxt, loc, errors, ccxt);
    return cont2.cont(left, cxt, loc, errors, ccxt);
  }

  @Override
  public boolean isJump()
  {
    return cont2.isJump();
  }
}